<?php
$this->pageHeader = t('PAGE_TITLE', 'district');
$this->pageTitle = t('PAGE_TITLE', 'district');
$toolbar = new LGToolbar();
$toolbar->buttonAddNew('500', '380', t('PAGE_TITLE_ADDNEW', 'district'));
$toolbar->buttonDelete();
$toolbar->buttonRefresh();
$this->pageToolbar = $toolbar->mergeToolbar();
?>

<div id="ccontent">    
    <div id="message"></div>                               
    <!-- search-form -->                                
    <div class="search-form"> 														
	<?php
	$this->renderPartial('_search', array(
	    'model' => $model,
	));
	?>
    </div>
    <!-- grid -->
    <?php
    $this->widget('GridView', array(
	'id' => 'DataGrid',
	'dataProvider' => $model->search(),
	'itemsCssClass' => 'grid',
	'summaryText' => LGHelpers::getSummary(),
	'columns' => array(
	    array(
		'header' => '#',
		'class' => 'CCheckBoxColumn',
		'selectableRows' => '2',
		'htmlOptions' => array('width' => '10px', 'style' => 'text-align:center'),
		'id' => 'chkId',
	    ),
	    array(
		'name' => 'district_name',
		'value' => 'CHtml::encode($data->district_name)',
		'header' => t('LBL_DISTRICT_NAME', 'district'),
		'htmlOptions' => array('width' => '120px'),
		'type' => 'raw',
	    ),
			array(
					'name' => 'name_jp',
					'value' => 'CHtml::encode($data->name_jp)',
					'header' => t('LBL_NAME_JP', 'district'),
					'htmlOptions' => array('width' => '120px'),
					'type' => 'raw',
			),
            array(
                'header' => t('LBL_PROVINCE_NAME', 'district'),
                'name' => 'province_id',
                'value' => '$data->province->province_name',
                'htmlOptions' => array('width' => '114px', 'align' => 'center'),
            ),
            array(
		'name' => 'update_date',
		'header' => t('LBL_UPDATE_DATE', 'district'),
		'htmlOptions' => array('width' => '120px', 'style' => 'text-align:center'),
	    ),
	    array(
		'name' => 'updated_by',
		'value' => 'CHtml::encode($data->updated_by)',
		'header' => t('LBL_UPDATED_BY', 'district'),
		'type' => 'raw',
		'htmlOptions' => array('width' => '100px', 'style' => 'text-align:center'),
	    ),
             array(
		'header' => t('LBL_ACTION', 'district'),
		'headerHtmlOptions' => array('width' => '10px', 'style' => 'text-align:center'),
		'value' => 'app()->controller->editDialogButtonHtml($data, t("LBL_EDIT_DISTRICT", "district"), 500, 380)',		    
		'type' => 'raw',
		'htmlOptions' => array('width' => '57px', 'align' => 'center'),
	    ),
	),
    ));
    ?>
</div>